#include <alibabacloud/oss/OssClient.h>

#ifndef OSSUPLOADER_H
#define OSSUPLOADER_H

using namespace AlibabaCloud::OSS;

namespace liboss {

    class OssUploader {
    public:
        OssUploader();
        ~OssUploader();
        int InitUploader(const std::string &endPoint, const std::string &accessKeyId, const std::string &accessKeySecret);
        int UploadData(const std::string &bucketName, const std::string &objectName, const char *buffer);
        int UploadFile(const std::string &bucketName, const std::string &objectName, const std::string &path);

    private:
        std::string m_endPoint;
        std::string m_accessKeyId;
        std::string m_accessKeySecret;
        std::shared_ptr<ClientConfiguration> m_clientConf;
        std::shared_ptr<OssClient> m_client;

    };

} // namespace liboss

#endif // OSSUPLOADER_H